package mysql

import "gorm.io/gorm"

type User struct {
	gorm.Model
	UserName string `gorm:"type:varchar(20);not null;comment:'用户名'"`
	PassWord string `gorm:"type:varchar(20);not null;comment:'密码'"`
}

type House struct {
	gorm.Model
	HouseCity    string  `gorm:"type:varchar(30);not null;comment:'房源城市'"`
	HouseAddress string  `gorm:"type:varchar(50);not null;comment:'房源地址'"`
	HouseNumber  string  `gorm:"type:varchar(50);not null;comment:'楼栋号'"`
	HouseFloor   string  `gorm:"type:varchar(50);not null;comment:'楼层'"`
	HouseArea    int     `gorm:"type:varchar(200);not null;comment:'房源面积'"`
	HousePrice   float64 `gorm:"type:decimal(10,2);not null;comment:'房源价格'"`
	HouseStatus  int     `gorm:"type:tinyint(1);default:1;not null;comment:'房源状态:1-上架,2-未上架'"`
}

type HouseGoods struct {
	gorm.Model
	GoodsImg    string  `gorm:"type:varchar(500);not null;comment:'房源照片'"`
	GoodsAuthor string  `gorm:"type:varchar(50);not null;comment:'房源描述'"`
	GoodsArea   string  `gorm:"type:varchar(50);not null;comment:'房源面积'"`
	GoodsPrice  float64 `gorm:"type:decimal(10,2);not null;comment:'房源价格'"`
	GoodsStatus int     `gorm:"type:tinyint(1);default:1;not null;comment:'房源状态:1-上架,2-未上架'"`
}
